home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / DTS Sample Code / System 7.0 Samples / MacShell / !! MacShell.Roadmap < prev    next >
Encoding:
Text File  |  1991-12-04  |  4.4 KB  |  127 lines  |  [TEXT/MPS ]

  1. MacShell is broken up into a lot of files to (hopefully) make things easier for
  2. you to use.  We have tried to arrange the source files in a way that you can
  3. start making it into you application right away.  Of course, we realize that
  4. we can't think of everything here.  (That's why you are there.)  So if you
  5. have any suggestions to make MacShell better, please don't be shy.
  6.  
  7.  
  8. Here's the organization of the source files:
  9.  
  10. MACSHELL C CODE:  (Files you probably will need to change have are bulleted.)
  11.  
  12.     AEConnect.c
  13. This file holds the AppleEvents code that establishes a connection between
  14. two applications.  This code establishes the connection to a specific
  15. window, and not just to a specific application on a specific machine.
  16.  
  17. •    AECustom.c
  18. This file holds the application's custom AppleEvents code.  It already
  19. holds some sample custom AppleEvents code for sending and receiving
  20. blocks of text.
  21.  
  22.     AERequired.c
  23. This file holds the AppleEvents code that handles the required AppleEvents.
  24. This code should not have to be changed.
  25.  
  26.     AEUtils.c
  27. This file holds various miscellaneous AppleEvents functions.  These are
  28. convenient to use, but should not have to change.
  29.  
  30. •    DoCursor.c
  31. This is the code for handling the cursor and for figuring out the cursor
  32. region for WaitNextEvent.  Simply replace this code with your application's
  33. cursor code.
  34.  
  35. •    DoEvent.c
  36. This is the code that dispatches for the different events.  Replace code
  37. as necessary for your application.
  38.  
  39.     EventLoop.c
  40. This code does next to nothing, and therefore most likely doesn't have to
  41. change, or doesn't need to change much.
  42.  
  43.     File.c
  44. This is a (kind-of) generic file I/O unit.  The code in this file probably
  45. doesn't have to change.  The functions that are application-specific are
  46. found in file2.c.
  47.  
  48. •    File2.c
  49. Here are the application-specific functions.  You will need to change these
  50. functions from the MacShell samples to be specific to your task.
  51.  
  52. •    Help.c
  53. This is the balloon help code.  MacShell supports dynamic balloon help in the
  54. content of the window.  This file just holds some sample code for balloon
  55. help in the window content.
  56.  
  57. •    IdleTasks.c
  58. Handle any NULL event tasks that you application has.  For MacShell, this is
  59. when the balloon help code is called.
  60.  
  61.     Init.c
  62. This initialization code is separated from the rest of the application
  63. because it isn't supposed to have to change.  (Yea, right.)
  64.  
  65. •    Menu.c
  66. Application-specific menu code goes here.
  67.  
  68.     Print.c
  69. This print-loop code shouldn't have to change.  It sets up a global that
  70. the ImageDocument function can use to determine if it is printing or not.
  71. This global is the page number to be printed.  (If it is 0, then the
  72. application isn't printing.)  If the user wants all pages printed, the
  73. print-loop keeps sending ImageDocument incrementally larger page numbers
  74. to print.  ImageDocument is responsible for figuring out that there are no
  75. more pages to print.  When there are no more pages, just set gPrintPage
  76. to zero and return.  The print-loop won't call ImageDocument after that.
  77. (This print-loop code is ZZ approved, and may end up in the print-loop
  78. tech-note.)
  79.  
  80.     Start.c
  81. This is the code that gets the application going.  This is where you
  82. will find main().
  83.  
  84.     TextEditControl.c
  85. This is code for a TextEdit control.  The control can easily be added to a
  86. window, just like any other control.  The control handles clicks and key
  87. events.  It also handles scrolling, cut/copy/paste/clear, as well as undo.
  88. (I think you will like this code.)
  89.  
  90.     Utils.c
  91. This is a catch-all for useful things I didn't know where else to put.  You
  92. may like the code for key-equivalents for dialogs.  The key-equivalents are
  93. put in the resource fork, so they can be localized.
  94.  
  95.     Window.c
  96. This is where all the generic window code lives.
  97.  
  98. •    Window2.c
  99. This is where all the application-specific window code lives.
  100.  
  101.  
  102. MACSHELL ASSEMBLY CODE:
  103.  
  104. There is a little bit of assembly code needed for MacShell.  Here are some
  105. descriptions of those files:
  106.  
  107.     TextEditControl.a
  108. This is the assembly code glue for the TextEdit control.
  109.  
  110.     View.cdef.a
  111. This is a little assembly code for a control definition.  It is just a cdef
  112. stub that jumps to the application code.  This is very useful for custom
  113. controls that need to call the rest of the application.
  114.  
  115.  
  116.  
  117. A useful file to look at is MacShell.protos.  This is where all function
  118. prototypes can be found.  They are grouped based on source file, so you
  119. can use MacShell.protos as a table of content (of sorts) to find various
  120. functions.
  121.  
  122.  
  123.  
  124. Happy Apps!
  125.  
  126. Eric Soldan
  127.